package com.dong.resource;

import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import org.springframework.context.support.FileSystemXmlApplicationContext;
import org.springframework.core.io.Resource;
import org.springframework.core.io.ResourceLoader;
import org.springframework.core.io.support.PathMatchingResourcePatternResolver;

import java.io.IOException;
import java.util.Arrays;

/**
 * description
 *
 * @author Administrator 2021/09/07 14:14
 */
public class ResourceTest {

    public static void main(String[] args) throws IOException {
        ApplicationContext context = new ClassPathXmlApplicationContext("bean-resource.xml");

        ApplicationContext context1 = new FileSystemXmlApplicationContext("classpath:bean-resource.xml");
        MyBean myBean = context.getBean(MyBean.class);
        System.out.println(myBean);

        MyBean myBean1 = context1.getBean(MyBean.class);
        System.out.println(myBean1);
    }

}
